package config

import (
	"github.com/zeromicro/go-zero/rest"
	"gorm.io/gorm/logger"
)

type (
	NaCosConf struct {
		Address   string `json:"configCenterHost"`
		Port      uint64 `json:"configCenterPort"`
		Namespace string `json:"configCenterNamespace"`
		Username  string `json:"configCenterUsername"`
		Password  string `json:"configCenterPassword"`
		LogLevel  string `json:"configCenterLogLevel"`
	}

	DataBaseConf struct {
		Host     string `json:"host"`
		Database string `json:"database"`
		Username string `json:"username"`
		Password string `json:"password"`
		Port     uint64 `json:"port"`
		LogLevel logger.LogLevel
	}

	CacheConf struct {
		Host     string `json:"host"`
		Password string `json:"password"`
		Port     uint64 `json:"port"`
		Db       int    `json:"db"`
	}

	BusinessConf struct {
		Domain string `json:"domain"`
	}

	App struct {
		Env string `json:"env"`
	}
)

type Config struct {
	rest.RestConf
	NaCosConf
	App
}
